package afcp.alumni.model.base;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQuery;

import afcp.alumni.dao.base.DaoDatastore;

/**
 * <p>
 * Interface for a Datastore Entity. It is a bean (an object with properties,
 * getters and setters) representing a data kind of the datastore for
 * manipulation in the Java code. Amongst others, it is used by the {@link DaoDatastore}
 * (Data Access Object) and its children for communication with the database.
 * The link with the datastore is made using JPA annotations like {@literal @}
 * {@link Entity}, {@literal @}{@link NamedQuery}, {@literal @}{@link Column}...
 * </p>
 * 
 * <p>
 * This interface allows to get its Id in methods taking any of the entities
 * without knowing the implementation (and where there is no need to get the
 * implementation since only the Id is required, for instance to delete it from
 * the datastore, and all the entities have an Id).
 * </p>
 * 
 * 
 * @author Antoine
 * 
 */
public interface MyEntity {
	/**
	 * Returns this entity's unique name/identifier in its {@link String}
	 * version. Amongst others, it is used in the logs.
	 * 
	 * @return The unique id of this entity.
	 */
	public String getId();
//	public void setId(String id);
}
